<template>
  <div>
    <button @click="handleClick(item)" v-for="(item,index) of btns" :key="index">{{item == "counter" ? "计数" :"" || item == "other" ? "其他" :""|| item == "login" ? "登入" :"" }}</button>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  data() {
    return {
        btns:["counter","other","login"]
    };
  },
  mounted() {
    console.log(this.$store.state.api);
  },
  methods: {
    handleClick(t){
         this.$router.push(`/${t}`)
    }
  },
};
</script>

<style></style>
